﻿using System;

namespace LxCFD
{
    public abstract class ValueBase<T>
    {
        public ValueBase<T> GetACopy(HeadBase zoneOrContact)
        {
            if (this is Value1Base<T> v1)
            {
                return v1.GetCopy(zoneOrContact);
            }
            else if (this is Value2Base<T> v2)
            {
                return v2.GetCopy(zoneOrContact);
            }
            else
            {
                throw new Exception();
            }
        }
    }
}
